package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxfw_candy_rotate;
import cn.bj.dao.Yxfw_candy_rotateMapper;

@Service
public class CandyRotateService {

	@Autowired
	Yxfw_candy_rotateMapper yxfw_candy_rotateMapper;

	// 查询所有
	public List<Yxfw_candy_rotate> selectAllCandyRotate() {
		return yxfw_candy_rotateMapper.selectByExample(null);
	}

	// 新增
	public int insertCandyRotate(Yxfw_candy_rotate candyRotate) {
		return yxfw_candy_rotateMapper.insert(candyRotate);
	}

	// 删除
	public int deleteCandyRotate(Integer id) {
		return yxfw_candy_rotateMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxfw_candy_rotate selectById(Integer id) {
		return yxfw_candy_rotateMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateCandyR(Yxfw_candy_rotate candyR) {
		return yxfw_candy_rotateMapper.updateByPrimaryKey(candyR);
	}

}
